function phonecode(phone, verify_code) {
    var xhr = new XMLHttpRequest();//新建一个元素对象
    xhr.onreadystatechange = function () {
        if (xhr.readyState == 4 && xhr.status == 200) {
            var result = JSON.parse(xhr.responseText)
            if (result.status == 1) {
                location.href = "/static/set_password.html" + location.search
            } else if (result.errorCode == 43) {
                alert(result.errorMsg);
                location.href = "/static/phone_verify.html" + location.search;
            } else {
                alert(result.errorMsg);
            }
        }
    }
    var url = "/app_phone_code"
    // alert(url)
    xhr.open("POST", url, true);
    xhr.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
    //这里是发起请求
    xhr.send("phone=" + phone + '&verify_code=' + verify_code);
}